package com.yztc.yidoutang.fragment.zhuye_fragment;

import android.content.Context;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.widget.ImageView;
import android.widget.TextView;

import com.stx.xhb.xbanner.XBanner;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 * 主页Fragment中相当于MVP中Presenter层的类
 */
public class ZhuYePresenter implements ZhuYeContract.Presenter {
    private ZhuYeContract.Model model;
    private ZhuYeContract.View view;

    public ZhuYePresenter(ZhuYeContract.View view) {
        this.view = view;
        this.model = new ZhuYeModel();
    }

    @Override
    public void initBaseData(Context context, XBanner banner, ImageView card, CircleImageView header, TextView title,
                             TextView author, TabLayout tabs, ViewPager vp) {
        model.initBaseData(context, banner, card, header, title, author, tabs, vp);
    }

    @Override
    public void onChangeClicked(boolean isChecked) {
        model.onChangeClicked(isChecked);
    }
}